/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package th.model;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embedded;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 *
 * @author fikri
 */
@Entity
@Table(name = "taha")
@NamedQueries({
    @NamedQuery(name = "Taha.findAll", query = "SELECT t FROM Taha t")})
public class Taha implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @Column(name = "no_Akaun")
    private String noAkaun;
    
    @Column(name = "no_ahli")
    private String noAhli;
    
    @Basic(optional = false)
    @Column(name = "kod_jenis_kelab")
    private String jenisKelab;
    
    @Column(name = "nama")
    private String nama;
    
    @Column(name = "trh_Lahir")
    @Temporal(TemporalType.TIMESTAMP)
    private Date trhLahir;
    
    @Column(name = "umur")
    private Integer umur;
    
    @Basic(optional = false)
    @Column(name = "no_pengenalan")
    private String noPengenalan;
    
    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "kod_jantina")
    private KodJantina jantina;
    
    @Column(name = "alamat1")
    private String alamat1;
    
    @Column(name = "alamat2")
    private String alamat2;
    
    @Column(name = "alamat3")
    private String alamat3;
    
    @Column(name = "alamat4")
    private String alamat4;
    
    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "poskod")
    private Poskod poskod;
    
    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "kod_negeri")
    private KodNegeri negeri;
    
    @Column(name = "telefon")
    private String telefon;
    
    @Column(name = "email")
    private String email;
    
    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "kod_sekolah")
    private KodSekolah sekolah;
    
    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "kod_jenis_sekolah")
    private KodJenisSekolah jenisSekolah;
    
    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "kod_negeri_sekolah")
    private KodNegeri negeriSekolah;
    
    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "kod_universiti")
    private KodUniversiti universiti;
    
    @Column(name = "no_matrik")
    private String noMatrik;
    
    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "kod_tahap_pengajian")
    private KodTahapPengajian tahapPengajian;
    
    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "kod_jenis_pengajian")
    private KodJenisPengajian jenisPengajian;
    
    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "jurusan_pengajian")
    private KodPengajian jurusanPengajian;
    
    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "fakulti_pengajian")
    private KodFakulti fakultiPengajian;
    
    @Column(name = "trh_masuk_IPT")
    @Temporal(TemporalType.TIMESTAMP)
    private Date trhmasukIPT;
    
    @Column(name = "trh_tamat_IPT")
    @Temporal(TemporalType.TIMESTAMP)
    private Date trhtamatIPT;
    
//    @Embedded
//    private InfoAudit infoAudit;

    public Taha() {
    }

    public Taha(String noAkaun) {
        this.noAkaun = noAkaun;
    }
    public String getNoAkaun() {
        return noAkaun;
    }

    public void setNoAkaun(String noAkaun) {
        this.noAkaun = noAkaun;
    }

    public String getNoAhli() {
        return noAhli;
    }

    public void setNoAhli(String noAhli) {
        this.noAhli = noAhli;
    }

    public String getNama() {
        return nama;
    }

    public void setNama(String nama) {
        this.nama = nama;
    }

    public Date getTrhLahir() {
        return trhLahir;
    }

    public void setTrhLahir(Date trhLahir) {
        this.trhLahir = trhLahir;
    }

    public Integer getUmur() {
        return umur;
    }

    public void setUmur(Integer umur) {
        this.umur = umur;
    }

    public String getNoPengenalan() {
        return noPengenalan;
    }

    public void setNoPengenalan(String noPengenalan) {
        this.noPengenalan = noPengenalan;
    }

    public String getAlamat1() {
        return alamat1;
    }

    public void setAlamat1(String alamat1) {
        this.alamat1 = alamat1;
    }

    public String getAlamat2() {
        return alamat2;
    }

    public void setAlamat2(String alamat2) {
        this.alamat2 = alamat2;
    }

    public String getAlamat3() {
        return alamat3;
    }

    public void setAlamat3(String alamat3) {
        this.alamat3 = alamat3;
    }

    public String getAlamat4() {
        return alamat4;
    }

    public void setAlamat4(String alamat4) {
        this.alamat4 = alamat4;
    }

    public Poskod getPoskod() {
        return poskod;
    }

    public void setPoskod(Poskod poskod) {
        this.poskod = poskod;
    }    

    public String getTelefon() {
        return telefon;
    }

    public void setTelefon(String telefon) {
        this.telefon = telefon;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    

    public String getNoMatrik() {
        return noMatrik;
    }

    public void setNoMatrik(String noMatrik) {
        this.noMatrik = noMatrik;
    }

    public String getJenisKelab() {
        return jenisKelab;
    }

    public void setJenisKelab(String jenisKelab) {
        this.jenisKelab = jenisKelab;
    }

    public KodJantina getJantina() {
        return jantina;
    }

    public void setJantina(KodJantina jantina) {
        this.jantina = jantina;
    }

    public KodNegeri getNegeri() {
        return negeri;
    }

    public void setNegeri(KodNegeri negeri) {
        this.negeri = negeri;
    }

    public KodSekolah getSekolah() {
        return sekolah;
    }

    public void setSekolah(KodSekolah sekolah) {
        this.sekolah = sekolah;
    }

    public KodJenisSekolah getJenisSekolah() {
        return jenisSekolah;
    }

    public void setJenisSekolah(KodJenisSekolah jenisSekolah) {
        this.jenisSekolah = jenisSekolah;
    }

    public KodNegeri getNegeriSekolah() {
        return negeriSekolah;
    }

    public void setNegeriSekolah(KodNegeri negeriSekolah) {
        this.negeriSekolah = negeriSekolah;
    }

    public KodUniversiti getUniversiti() {
        return universiti;
    }

    public void setUniversiti(KodUniversiti universiti) {
        this.universiti = universiti;
    }

    public KodTahapPengajian getTahapPengajian() {
        return tahapPengajian;
    }

    public void setTahapPengajian(KodTahapPengajian tahapPengajian) {
        this.tahapPengajian = tahapPengajian;
    }

    public KodJenisPengajian getJenisPengajian() {
        return jenisPengajian;
    }

    public void setJenisPengajian(KodJenisPengajian jenisPengajian) {
        this.jenisPengajian = jenisPengajian;
    }

   

    public KodPengajian getJurusanPengajian() {
        return jurusanPengajian;
    }

    public void setJurusanPengajian(KodPengajian jurusanPengajian) {
        this.jurusanPengajian = jurusanPengajian;
    }

    public KodFakulti getFakultiPengajian() {
        return fakultiPengajian;
    }

    public void setFakultiPengajian(KodFakulti fakultiPengajian) {
        this.fakultiPengajian = fakultiPengajian;
    }

    public Date getTrhmasukIPT() {
        return trhmasukIPT;
    }

    public void setTrhmasukIPT(Date trhmasukIPT) {
        this.trhmasukIPT = trhmasukIPT;
    }

    public Date getTrhtamatIPT() {
        return trhtamatIPT;
    }

    public void setTrhtamatIPT(Date trhtamatIPT) {
        this.trhtamatIPT = trhtamatIPT;
    }

//    public InfoAudit getInfoAudit() {
//        return infoAudit;
//    }
//
//    public void setInfoAudit(InfoAudit infoAudit) {
//        this.infoAudit = infoAudit;
//    }
    @Override
    public int hashCode() {
        int hash = 0;
        hash += (noAkaun != null ? noAkaun.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Taha)) {
            return false;
        }
        Taha other = (Taha) object;
        if ((this.noAkaun == null && other.noAkaun != null) || (this.noAkaun != null && !this.noAkaun.equals(other.noAkaun))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "th.model.Taha[ noAkaun=" + noAkaun + " ]";
    }
    
}
